{
    class PlayerItem extends ui.Loading.PlayerItemUI {
        /**
         * @param {String} type 此条信息的类型，分为 mine : 自己, teammate : 队友， enemy : 敌方玩家
         */
        constructor (type) {
            super();

            this.type = type;
            
            this.avatarBox.scrollRect = {x : 0, y : 0, width : this.avatarBox.width, height : this.avatarBox.height};
            switch (type) {
                case "mine":
                    this.maskLineTop.visible = true;
                    this.maskLineBottom.visible = true;
                    break;
                case "teammate":
                    this.bg.skin = "res/loading/bg_list_teammate.png";
                    this.bg.right = 0;
                    break;
                case "enemy":
                    this.bg.skin = "res/loading/bg_list_enemy.png";
                    this.percent.pos(33, 18);
                    this.vipBG.pos(362, 90);
                    this.vipLevel.pos(403, 100);
                    this.avatarBox.x = 16;
                    this.userName.pos(360, 138);
                    for(let i = this.userName.numChildren - 1; i >= 0; i--){
                        this.userName.getChildAt(i).align = "left";
                    }
                    break;
            }
        }

        init (data, index) {
            for(let i = this.userName.numChildren - 1; i >= 0; i--){
                this.userName.getChildAt(i).text = data.ue;
            }

            this.vipLevel.text = `vip${data.lv}`;

            this.y = index * 200;
            if(this.type == "enemy"){
                this.x = 887 - index * 10;
            }else{
                this.x = - index * 10;
            }
        }

        update (val) {
            for(let i = this.percent.numChildren - 1; i >= 0; i--){
                this.percent.getChildAt(i).text = `${val}%`;
            }
        }
    }

    Sail.class(PlayerItem, "Com.Loading.PlayerItem");
}